var request;

function sendSoftToDatabase()
{
	var req = servletUrl;
	addRequest(req);
    request.onreadystatechange=addtable();
}

function addTable()
{
	if (request.readyState==4)
	{
		document.write(request.responseText);
	}
}

function addrequest(req)
{
    try 
	{                                     //create a request for netscape, mozilla, opera, etc.
        request = new XMLHttpRequest();
    }
	catch (e) 
	{
        try 
		{                                 //create a request for internet explorer
            request = new ActiveXObject("Microsoft.XMLHTTP");
        }
		catch (e) 
		{                           //do some error-handling
            alert("XMLHttpRequest error: " + e);
        }
    }

    request.open("POST", req, true);       //prepare the request
    request.send();                       //send it
    return request;                           //return the request
}